\gdef\mpxshipout{\shipout\hbox\bgroup
  \setbox0=\hbox\bgroup}
\gdef\stopmpxshipout{\egroup  \dimen0=\ht0 \advance\dimen0\dp0
  \dimen1=\ht0 \dimen2=\dp0
  \setbox0=\hbox\bgroup
    \box0
    \ifnum\dimen0>0 \vrule width1sp height\dimen1 depth\dimen2 
    \else \vrule width1sp height1sp depth0sp\relax
    \fi\egroup
  \ht0=0pt \dp0=0pt \box0 \egroup}
\mpxshipout% line 5 ./fig.mp
\struct p1 \%
\stopmpxshipout
\mpxshipout% line 6 ./fig.mp
\struct p2 \%
\stopmpxshipout
\mpxshipout% line 7 ./fig.mp
processor p3 \%
\stopmpxshipout
\end{document}
